package com.example.myapplication;

import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class AlarmReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        new AlertDialog.Builder(context)
                .setIcon(R.drawable.ic_launcher_background)
                .setTitle("您设置的闹钟")
                .setMessage("时间到")
                .setPositiveButton("确定", null)
                .setNegativeButton("Cancel", null)
                .show();
        Toast.makeText(context, "时间到", Toast.LENGTH_SHORT).show();
    }
}
